home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / Binomial.cc,v < prev    next >
Text File  |  1989-02-20  |  2KB  |  85 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.32.13;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.48.32;  author grunwald;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     88.09.18.16.42.19;  author grunwald;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @@
  27.  
  28.  
  29. 3.2
  30. log
  31. @Start using Gnu library heaps for schedulers
  32. @
  33. text
  34. @/* 
  35. Copyright (C) 1988 Free Software Foundation
  36.     written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  37.  
  38. This file is part of GNU CC.
  39.  
  40. GNU CC is distributed in the hope that it will be useful,
  41. but WITHOUT ANY WARRANTY.  No author or distributor
  42. accepts responsibility to anyone for the consequences of using it
  43. or for whether it serves any particular purpose or works at all,
  44. unless he says so in writing.  Refer to the GNU CC General Public
  45. License for full details.
  46.  
  47. Everyone is granted permission to copy, modify and redistribute
  48. GNU CC, but only under the conditions described in the
  49. GNU CC General Public License.   A copy of this license is
  50. supposed to have been given to you along with GNU CC so you
  51. can know your rights and responsibilities.  It should be in a
  52. file named COPYING.  Among other things, the copyright notice
  53. and this notice must be preserved on all copies.  
  54. */
  55. #include <Binomial.h>
  56.  
  57. double Binomial::operator()()
  58. {
  59.     int s = 0;
  60.     for (int i = 0; i < pN; i++) {
  61.     if (pGenerator -> asDouble() < pU) {
  62.         s++;
  63.     }
  64.     }
  65.     return(double(s));
  66. }
  67.  
  68. @
  69.  
  70.  
  71. 3.1
  72. log
  73. @Steay version
  74. @
  75. text
  76. @@
  77.  
  78.  
  79. 1.1
  80. log
  81. @Initial revision
  82. @
  83. text
  84. @@
  85.